<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Additional Interval Orderings</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.Icl">
<link rel="up" href="../function_reference.html" title="Function Reference">
<link rel="prev" href="interval_construction.html" title="Interval Construction">
<link rel="next" href="miscellaneous_interval_functions.html" title="Miscellaneous Interval Functions">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="interval_construction.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../function_reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="miscellaneous_interval_functions.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section boost_icl_function_reference_additional_interval_orderings" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_icl.function_reference.additional_interval_orderings"></a><a class="link" href="additional_interval_orderings.html" title="Additional Interval Orderings">Additional
      Interval Orderings</a>
</h3></div></div></div>
<p>
        In addition to the standard orderings <code class="computeroutput"><span class="keyword">operator</span>
        <span class="special">&lt;</span></code> and rleated <code class="computeroutput"><span class="special">&gt;</span>
        <span class="special">&lt;=</span> <span class="special">&gt;=</span></code>
        that you will find in the <a class="link" href="../interface/function_synopsis.html#function_synopsis_table"><span class="emphasis"><em><span class="bold"><strong>librarie's function synopsis</strong></span></em></span></a>, intervals
        implement some additional orderings that can be useful.
      </p>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
<col>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
              <p>
                T
              </p>
              </th>
<th>
              <p>
                discrete<br> _interval
              </p>
              </th>
<th>
              <p>
                continuous<br> _interval
              </p>
              </th>
<th>
              <p>
                right_open<br> _interval
              </p>
              </th>
<th>
              <p>
                left_open<br> _interval
              </p>
              </th>
<th>
              <p>
                closed<br> _interval
              </p>
              </th>
<th>
              <p>
                open<br> _interval
              </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
              <p>
                Interval bounds
              </p>
              </td>
<td>
              <p>
                dynamic
              </p>
              </td>
<td>
              <p>
                dynamic
              </p>
              </td>
<td>
              <p>
                static
              </p>
              </td>
<td>
              <p>
                static
              </p>
              </td>
<td>
              <p>
                static
              </p>
              </td>
<td>
              <p>
                static
              </p>
              </td>
</tr>
<tr>
<td>
              <p>
                Form
              </p>
              </td>
<td>
              <p>
              </p>
              </td>
<td>
              <p>
              </p>
              </td>
<td>
              <p>
                asymmetric
              </p>
              </td>
<td>
              <p>
                asymmetric
              </p>
              </td>
<td>
              <p>
                symmetric
              </p>
              </td>
<td>
              <p>
                symmetric
              </p>
              </td>
</tr>
<tr>
<td>
              <p>
                <span class="emphasis"><em><span class="bold"><strong>Orderings</strong></span></em></span>
              </p>
              </td>
<td>
              <p>
              </p>
              </td>
<td>
              <p>
              </p>
              </td>
<td>
              <p>
              </p>
              </td>
<td>
              <p>
              </p>
              </td>
<td>
              <p>
              </p>
              </td>
<td>
              <p>
              </p>
              </td>
</tr>
<tr>
<td>
              <p>
                <code class="computeroutput"><span class="keyword">bool</span> <span class="identifier">exclusive_less</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;,</span>
                <span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;)</span></code>
              </p>
              </td>
<td>
              <p>
                1
              </p>
              </td>
<td>
              <p>
                1
              </p>
              </td>
<td>
              <p>
                1
              </p>
              </td>
<td>
              <p>
                1
              </p>
              </td>
<td>
              <p>
                1
              </p>
              </td>
<td>
              <p>
                1
              </p>
              </td>
</tr>
<tr>
<td>
              <p>
                
</p>
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">bool</span> <span class="identifier">lower_less</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;,</span> <span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;)</span>
<span class="keyword">bool</span> <span class="identifier">lower_equal</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;,</span> <span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;)</span>
<span class="keyword">bool</span> <span class="identifier">lower_less_equal</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;,</span> <span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;)</span>
</pre>
<p>
              </p>
              </td>
<td>
              <p>
                1
              </p>
              </td>
<td>
              <p>
                1
              </p>
              </td>
<td>
              <p>
                1
              </p>
              </td>
<td>
              <p>
                1
              </p>
              </td>
<td>
              <p>
                1
              </p>
              </td>
<td>
              <p>
                1
              </p>
              </td>
</tr>
<tr>
<td>
              <p>
                
</p>
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">bool</span> <span class="identifier">upper_less</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;,</span> <span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;)</span>
<span class="keyword">bool</span> <span class="identifier">upper_equal</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;,</span> <span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;)</span>
<span class="keyword">bool</span> <span class="identifier">upper_less_equal</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;,</span> <span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;)</span>
</pre>
<p>
              </p>
              </td>
<td>
              <p>
                1
              </p>
              </td>
<td>
              <p>
                1
              </p>
              </td>
<td>
              <p>
                1
              </p>
              </td>
<td>
              <p>
                1
              </p>
              </td>
<td>
              <p>
                1
              </p>
              </td>
<td>
              <p>
                1
              </p>
              </td>
</tr>
</tbody>
</table></div>
<p>
        A central role for the <span class="bold"><strong>icl</strong></span> plays the <code class="computeroutput"><span class="identifier">exclusive_less</span></code> ordering, which is used
        in all interval containers. The other orderings can be useful to simplify
        comparison of intervals specifically for dynamically bounded ones.
      </p>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
              <p>
                <span class="emphasis"><em><span class="bold"><strong>Orderings</strong></span></em></span>
              </p>
              </th>
<th>
              <p>
                Description
              </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
              <p>
                <code class="computeroutput"><span class="keyword">bool</span> <span class="identifier">exclusive_less</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;,</span>
                <span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;)</span></code>
              </p>
              </td>
<td>
              <p>
                <code class="computeroutput"><span class="identifier">exclusive_less</span><span class="special">(</span><span class="identifier">x1</span><span class="special">,</span> <span class="identifier">x2</span><span class="special">)</span></code>
                is true if every element of interval <code class="computeroutput"><span class="identifier">x1</span></code>
                is less than every element of interval <code class="computeroutput"><span class="identifier">x2</span></code>
                w.r.t. the the intervals <code class="computeroutput"><span class="identifier">Compare</span></code>
                ordering
              </p>
              </td>
</tr>
<tr>
<td>
              <p>
                
</p>
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">bool</span> <span class="identifier">lower_less</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;,</span> <span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;)</span>
<span class="keyword">bool</span> <span class="identifier">lower_equal</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;,</span> <span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;)</span>
<span class="keyword">bool</span> <span class="identifier">lower_less_equal</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;,</span> <span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;)</span>
</pre>
<p>
              </p>
              </td>
<td>
              <p>
                Compares the beginnings of intervals. 
</p>
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">lower_less</span><span class="special">(</span><span class="identifier">x</span><span class="special">,</span><span class="identifier">y</span><span class="special">)</span>  <span class="special">==</span> <span class="keyword">true</span><span class="special">;</span> <span class="comment">// x begins before y
</span><span class="identifier">lower_equal</span><span class="special">(</span><span class="identifier">x</span><span class="special">,</span><span class="identifier">y</span><span class="special">)</span> <span class="special">==</span> <span class="keyword">true</span><span class="special">;</span> <span class="comment">// x and y begin at the same element
</span><span class="identifier">lower_less_equal</span><span class="special">(</span><span class="identifier">x</span><span class="special">,</span><span class="identifier">y</span><span class="special">)</span> <span class="special">==</span> <span class="identifier">lower_less</span><span class="special">(</span><span class="identifier">x</span><span class="special">,</span><span class="identifier">y</span><span class="special">)</span> <span class="special">||</span> <span class="identifier">lower_equal</span><span class="special">(</span><span class="identifier">x</span><span class="special">,</span><span class="identifier">y</span><span class="special">);</span>
</pre>
<p>
              </p>
              </td>
</tr>
<tr>
<td>
              <p>
                
</p>
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">bool</span> <span class="identifier">upper_less</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;,</span> <span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;)</span>
<span class="keyword">bool</span> <span class="identifier">upper_equal</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;,</span> <span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;)</span>
<span class="keyword">bool</span> <span class="identifier">upper_less_equal</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;,</span> <span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;)</span>
</pre>
<p>
              </p>
              </td>
<td>
              <p>
                Compares the endings of intervals. 
</p>
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">upper_less</span><span class="special">(</span><span class="identifier">x</span><span class="special">,</span><span class="identifier">y</span><span class="special">)</span>  <span class="special">==</span> <span class="keyword">true</span><span class="special">;</span> <span class="comment">// x ends before y
</span><span class="identifier">upper_equal</span><span class="special">(</span><span class="identifier">x</span><span class="special">,</span><span class="identifier">y</span><span class="special">)</span> <span class="special">==</span> <span class="keyword">true</span><span class="special">;</span> <span class="comment">// x and y end at the same element
</span><span class="identifier">upper_less_equal</span><span class="special">(</span><span class="identifier">x</span><span class="special">,</span><span class="identifier">y</span><span class="special">)</span> <span class="special">==</span> <span class="identifier">upper_less</span><span class="special">(</span><span class="identifier">x</span><span class="special">,</span><span class="identifier">y</span><span class="special">)</span> <span class="special">||</span> <span class="identifier">upper_equal</span><span class="special">(</span><span class="identifier">x</span><span class="special">,</span><span class="identifier">y</span><span class="special">);</span>
</pre>
<p>
              </p>
              </td>
</tr>
</tbody>
</table></div>
<p>
        <span class="emphasis"><em><span class="bold"><strong>See also . . .</strong></span></em></span>
      </p>
<div class="informaltable"><table class="table">
<colgroup><col></colgroup>
<thead><tr></tr></thead>
<tbody><tr><td>
              <p>
                <a class="link" href="equivalences_and_orderings.html" title="Equivalences and Orderings"><span class="emphasis"><em><span class="bold"><strong>Equivalences and Orderings</strong></span></em></span></a>
              </p>
              </td></tr></tbody>
</table></div>
<p>
        <span class="emphasis"><em><span class="bold"><strong>Back to section . . .</strong></span></em></span>
      </p>
<div class="informaltable"><table class="table">
<colgroup><col></colgroup>
<thead><tr></tr></thead>
<tbody>
<tr><td>
              <p>
                <a class="link" href="../interface/function_synopsis.html#additional_interval_functions"><span class="emphasis"><em><span class="bold"><strong>Additional interval functions</strong></span></em></span></a>
              </p>
              </td></tr>
<tr><td>
              <p>
                <a class="link" href="../interface/function_synopsis.html#function_synopsis_table"><span class="emphasis"><em><span class="bold"><strong>Function
                Synopsis</strong></span></em></span></a>
              </p>
              </td></tr>
<tr><td>
              <p>
                <a class="link" href="../interface.html" title="Interface"><span class="emphasis"><em><span class="bold"><strong>Interface</strong></span></em></span></a>
              </p>
              </td></tr>
</tbody>
</table></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2007 -2010 Joachim Faulhaber<br>Copyright &#169; 1999 -2006 Cortex Software GmbH<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="interval_construction.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../function_reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="miscellaneous_interval_functions.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
